home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
gfx
/
opal
/
render.lha
/
RendTest.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-07
|
971b
|
46 lines
#include <proto/all.h>
#include <opal/opallib.h>
#include <graphics/gfxbase.h>
#include <stdio.h>
#include <stdlib.h>
#include "renderer.c"
struct GfxBase *GfxBase;
/* external functions (int Renderer.c) */
BOOL Open_OpalScreen (ULONG Modes);
void Render_To_Opal (long Y, long Width, long Lines,
UBYTE *Red, UBYTE *Green, UBYTE *Blue, BOOL Chunky);
void Opal_Render_Finished (void);
void Close_Opal (void);
UBYTE RedPlane[1000];
UBYTE GreenPlane[1000];
UBYTE BluePlane[1000];
void main (void)
{
register long x,y;
GfxBase = (struct GfxBase *) OpenLibrary ("graphics.library",0);
if (!Open_OpalScreen (HIRES24|ILACE24|OVERSCAN24))
{ puts ("Can't open opalvision screeen\n");
exit (0);
}
for (y=0; y<400; y++)
{ for (x=0; x<640; x++)
{ RedPlane[x] = x;
GreenPlane[x] = 255-x;
BluePlane[x] = y+x;
}
Render_To_Opal (y,640,1,RedPlane,GreenPlane,BluePlane,FALSE);
}
Opal_Render_Finished ();
Delay (100L);
Close_Opal ();
}